package com.ldzysoft.tropsexpert.network;



import com.ldzysoft.tropsexpert.model.GetExpertResultResponse;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface ApiService {

    /**
     * 获取图像识别结果
     *  网络图片Url
     * @return JsonObject
     */
//    @FormUrlEncoded
    @POST("/api/senseApi")
    @Headers({
            "Content-Type:application/x-www-form-urlencoded; charset=utf-8",
            "Authorization:APPCODE 1a7d7dfb5471465c9ccb966638957d4c"
    })
    Call<GetExpertResultResponse> getExpertResultByUrl(@Body RequestBody requestBody);

    /**
     * 获取图像识别结果
     * 网络图片Url
     * @return JsonObject
     */
//    @FormUrlEncoded
    @POST("/api/senseImg64Api")
    @Headers({
            "Content-Type:application/x-www-form-urlencoded; charset=utf-8",
            "Authorization:APPCODE 1a7d7dfb5471465c9ccb966638957d4c"
    })
    Call<GetExpertResultResponse> getExpertResultByBase64(@Body RequestBody requestBody);
}

